package com.sc.design.singleton.lazy;

/***
 * 懒汉模式
 */

class Emperor{
    private Emperor(){}
    private static Emperor emperor = null;
    public static Emperor getInstance(){
        if(emperor==null){
            emperor=new Emperor();
        }
        return emperor;
    }
    public  void say(){
        System.out.println("knee");
    }
}



